package edu.ynu.se.xiecheng.achitectureclass.dao;

import edu.ynu.se.xiecheng.achitectureclass.common.dao.LogicDAO;
import edu.ynu.se.xiecheng.achitectureclass.entity.DeviceData_3;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface DeviceData_3Dao extends LogicDAO<DeviceData_3, Long> {
    @Query("SELECT s FROM DeviceData_3 s WHERE s.isDeleted = 0 ORDER BY s.timestamp DESC")
    List<DeviceData_3> findLatestOne();
} 